﻿using System;
using System.Linq;
using System.IO;
using System.IO.IsolatedStorage;
using System.Collections.Generic;
using Microsoft.LightSwitch;
using Microsoft.LightSwitch.Framework.Client;
using Microsoft.LightSwitch.Presentation;
using Microsoft.LightSwitch.Presentation.Extensions;
namespace LightSwitchApplication
{
    public partial class SearchShops
    {
        partial void SearchShops_InitializeDataWorkspace(List<IDataService> saveChangesTo)
        {
            var item = this.DataWorkspace.SalesDepData.aspnet_Profiles.Where(c => c.aspnet_User.UserName == this.Application.User.Name).FirstOrDefault();
            if (item != null)
                this.Shopaspnet_Profile_UserId = item.aspnet_User.UserId;
        }

        partial void Cancel_Execute()
        {
            this.Close(false);
        }
    }
}
